<?
$tags = $this->tags;
?>




    <script src="/src/my.js"></script>
    <script src="jscripts/tiny_mce/jquery.tinymce.js"></script>



    <!--       1     -->
<link href="/uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/uploadify/swfobject.js"></script>
<script type="text/javascript" src="/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
//  $('#file_upload').uploadify({
//    'uploader'  : '/uploadify/uploadify.swf',
//    'script'    : '/tovar/resize',
//    'cancelImg' : '/uploadify/cancel.png',
//    'folder'    : '/uploads',
//    'auto'      : true
//  });
});
</script>
<!--       1     -->


<div id="update_edit">
    <div class="wrapper_header wrapper_up4 bg3 wrapper_width24">
        <h3>Business Profile : Adding micronews</h3>
    </div>


<div id="add" style="display:block; " class="wrapper_table wrapper_up2 bg2 wrapper_width24">
    <form method="post" enctype="multipart/form-data" action="/tovar/add" >
        <div>Name:

            <input type="block" name="name" value="">
            <div>Desc:
                <textarea id="description" name="description" rows="15" cols="80" style="width: 80%" class="tinymce">

                </textarea>
            </div>

<!--        2    -->
               <input id="file_upload" name="Filedata" type="file" />

<!--        2    -->
            <br/>
            <br/>

            <label for="item-tags">Тэги:</label>

            <select id="item-tags" name="item-tags">
                <? foreach ($tags as $tag): ?>

                    <option value="<?= $tag['id'] ?>" class="selected"><?= $tag['name'] ?></option>

                <? endforeach; ?>
            </select>
            <input type="submit" name="save" value="Submit"/>
            <input type="reset" name="reset" value="Reset"/>

            <br/>
            <input name="update_desc" class="button" type="submit" value="Add tovar"/>


            <br/>





        </div>
    </form>
</div>
<script type="text/javascript">
    if (document.location.protocol == 'file:') {
        alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
    }
</script>

<script src="/js/fcbkcomplete.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
    $(document).ready(function() {
        $("#item-tags").fcbkcomplete({
            json_url: "/ajax/search/",
            addontab: true,
            maxitems: 5,
            height: 2,
            cache: true
        });
    });
</script>

 <script type="text/javascript">
        $().ready(function() {
            $('textarea.tinymce').tinymce({
                // Location of TinyMCE script
                script_url : 'http://localhost/jscripts/tiny_mce/tiny_mce.js',

                // General options
                theme : "advanced",
                plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

                // Theme options
                theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect,image",
                theme_advanced_buttons2 : "",
                theme_advanced_buttons3 : "",
//                theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
                theme_advanced_toolbar_location : "top",
                theme_advanced_toolbar_align : "left",
                theme_advanced_statusbar_location : "bottom",
                theme_advanced_resizing : true,

                // Example content CSS (should be your site CSS)
                content_css : "http://localhost/css/styles.css",

                // Drop lists for link/image/media/template dialogs
                template_external_list_url : "lists/template_list.js",
                external_link_list_url : "lists/link_list.js",
                external_image_list_url : "lists/image_list.js",
                media_external_list_url : "lists/media_list.js",

                // Replace values for the template plugin
                template_replace_values : {
                    username : "Some User",
                    staffid : "991234"
                }
            });
        });
    </script>
    <!-- /TinyMCE -->